﻿namespace Common.Extensions;

public static class   CaCheKeyExtensions
{
    /// <summary>
    /// 授权用户信息
    /// </summary>
    /// <param name="userId">用户唯一标识</param>
    /// <returns></returns>
    public static string ToAuthUserCaCheKey(this string userId)
    {
        return $"{nameof(ToAuthUserCaCheKey)},{userId}";
    }

    /// <summary>
    /// 用户可访问的路径
    /// </summary>
    /// <param name="userId">用户唯一标识</param>
    /// <returns></returns>
    public static string ToAuthUserPathsCaCheKey(this string userId)
    {
        return $"{nameof(ToAuthUserPathsCaCheKey)},{userId}";
    }

    /// <summary>
    /// 在线用户
    /// </summary>
    /// <param name="str"></param>
    /// <returns></returns>
    public static string ToOnlineUserCaCheKey(this string str)
    {
        return $"{nameof(ToOnlineUserCaCheKey)}";
    }

    /// <summary>
    /// 租户缓存值
    /// </summary>
    /// <returns></returns>
    public static string TenantCacheKey()
    {
        return $"{nameof(TenantCacheKey)}";
    }
}